package com.parse.ip.parseip.customer;

import com.parse.ip.parseip.config.ActiveMQConfig;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

/**
 * 消费者1
 */
@Component
public class Customer {



    @JmsListener(destination = "producer ququ",containerFactory = "jmsListenerContainerQueue")
    public void customer(String message){
        System.out.println("接收得消息"+message);
    }


    @JmsListener(destination = ActiveMQConfig.TOPIC,containerFactory = "jmsListenerContainerTopic")
    public void topic(String message){
        System.out.println("topic1接收到消息"+message);
    }
}
